home *** CD-ROM | disk | FTP | other *** search
- if(!setVars)
- {
- startY = _Y;
- gg = 0;
- setVars = true;
- }
- stop();
- onEnterFrame = function()
- {
- if(_root.diff > 2000)
- {
- moveSpeed = 3;
- }
- else if(_root.diff > 1500)
- {
- moveSpeed = 4;
- }
- else if(_root.diff > 1000)
- {
- moveSpeed = 5;
- }
- else if(_root.diff > 500)
- {
- moveSpeed = 6;
- }
- if(_root.pauseMode == false)
- {
- if(_root.gameGo == true)
- {
- if(_currentframe == 1)
- {
- _rotation = _rotation + moveSpeed;
- }
- else
- {
- _rotation = 0;
- }
- g.play();
- if(go == false)
- {
- gotoAndStop(1);
- _X = random(Stage.width);
- _Y = startY;
- maxNum = _root.diff / 18;
- num = random(_root.diff / 18);
- if(num == 1 or gg >= maxNum)
- {
- gg = 0;
- go = true;
- }
- gg++;
- }
- else
- {
- if(_root.diff > 0)
- {
- if(_root.cm.hit.hitTest(this) && _currentframe == 1)
- {
- gotoAndStop(2);
- _root.health -= 15;
- }
- }
- if(_currentframe == 1)
- {
- if(_Y > -50)
- {
- _Y = _Y - moveSpeed;
- }
- else
- {
- go = false;
- }
- }
- }
- }
- }
- else
- {
- g.stop();
- }
- };
-